	// Tabs 菜单卡
	var Tabs=function(selector,options){
		this.setSelector(selector);
		this.setElement($(this.selector).get(0));
	}
	Tabs.prototype=new Control();
	Tabs.prototype.init=function(){
		var self=this;
		
		var selector=$(".tabsList",this.element).get(0);
		this.tabsList=new Tabs.TabsList(selector,function(focusNum){self.setFocusNum(focusNum);});
		this.tabsList.init()
		
		var selector=$(".tabsContentGroup",this.element).get(0);
		this.tabsContentGroup=new Tabs.TabsContentGroup(selector,function(focusNum){self.setFocusNum(focusNum);});
		this.tabsContentGroup.init();
		this.setFocusNum(0);
	}
	Tabs.prototype.setFocusNum=function(focusNum){
		this.focusNum=focusNum;
		this.tabsList.setFocusNum(focusNum);
		this.tabsContentGroup.setFocusNum(focusNum);
	}
	
	
	//TabsList
	Tabs.TabsList=function(selector,parentSetFoucsNum){
		this.selector=selector;
		this.parentSetFoucsNum=parentSetFoucsNum;
	}
	Tabs.TabsList.prototype.init=function(){
		var items=$("li",this.selector)
		var listItemList=new Array();
		var listItem=null;
		var selector=null;
		var self=this;
		for(var i=0;i<items.length;i++){
			selector=items.get(i);
			listItem=new Tabs.TabsListItem(selector,i,function(focusNum){self.parentSetFoucsNum(focusNum)});
			listItem.init();
			listItemList.push(listItem);
		};
		this.listItemList=listItemList;
	}
	Tabs.TabsList.prototype.focusNum=0;
	Tabs.TabsList.prototype.setFocusNum=function(focusNum){
		this.focusNum=focusNum;
		
		var listItemList=this.listItemList;
		for(var i=0;i<listItemList.length;i++){
			listItemList[i].focusClose();
		}
		listItemList[focusNum].focusOpen();
	}
	
	
	//TabsListItem
	Tabs.TabsListItem=function(selector,num,parentSetFoucsNum){
		this.selector=selector;
		this.num=num;
		this.parentSetFoucsNum=parentSetFoucsNum;
	}
	Tabs.TabsListItem.prototype.init=function(){
		var self=this;
		$(this.selector).bind("click",function(){
			self.parentSetFoucsNum(self.num);
		});
	}
	Tabs.TabsListItem.prototype.focusOpen=function(){
		$(this.selector).removeClass("focusClose").addClass("focusOpen");
	}
	Tabs.TabsListItem.prototype.focusClose=function(){
		$(this.selector).removeClass("focusOpen").addClass("focusClose");
	}
	
	
	
	//TabsContentGroup
	Tabs.TabsContentGroup=function(selector,parentSetFoucsNum){
		this.selector=selector;
		this.parentSetFoucsNum=parentSetFoucsNum;
	}
	Tabs.TabsContentGroup.prototype.init=function(){
		var items=$(".tabsContent",this.selector)
		var listItemList=new Array();
		var listItem=null;
		var selector=null;
		
		for(var i=0;i<items.length;i++){
			selector=items.get(i);
			listItem=new Tabs.TabsContent(selector,i);
			listItem.init();
			listItemList.push(listItem);
		};
		this.listItemList=listItemList;
	}
	Tabs.TabsContentGroup.prototype.focusNum=0;
	Tabs.TabsContentGroup.prototype.setFocusNum=function(focusNum){
		this.focusNum=focusNum;
		var listItemList=this.listItemList;
		for(var i=0;i<listItemList.length;i++){
			listItemList[i].focusClose();
		}
		if(listItemList.length>focusNum){
			listItemList[focusNum].focusOpen();
		}else{
			listItemList[0].focusOpen();
		}
	}
	
	//TabsContent
	Tabs.TabsContent=function(selector){
		this.selector=selector;
	}
	Tabs.TabsContent.prototype.init=function(){
	}
	Tabs.TabsContent.prototype.focusOpen=function(){
		$(this.selector).removeClass("focusClose").addClass("focusOpen");
	}
	Tabs.TabsContent.prototype.focusClose=function(){
		$(this.selector).removeClass("focusOpen").addClass("focusClose");
	}
	HTMLTurbo.control.Tabs=Tabs;